<!DOCTYPE html>
<!-- saved from url=(0047)http://c.tsz90.com/home/task/detail/id/581.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="apple-mobile-web-app-capable" content="yes">  
    <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
	
	<title>[581]采集数据,佣金10.00元</title>
	<link rel="stylesheet" href="__PUBLIC__/static/css/renwu/bootstrap.css">
	<link href="__PUBLIC__/static/css/renwu/reset_5.css" rel="stylesheet" type="text/css">
	<link href="__PUBLIC__/static/css/renwu/style.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" href="__PUBLIC__/static/css/renwu/font-awesome.min.css">
	
    <link rel="stylesheet" href="__PUBLIC__/static/css/renwu/dialog.css">
    <style type="text/css">
        .task-list-remain-num span {
            width: 33.33%;
            float: left;
            text-align: center;
        }
        .paging {
            padding: 30px 0;
        }
        .dialog {
          position: fixed;
          left: 0;
          top: 0;
          z-index: 10001;
          width: 100%;
          height: 100%;
        }
        .dialog-content {
            width: 70%;
        }
        .dialog-overlay {
          position: absolute;
          top: 0;
          left: 0;
          z-index: 10002;
          width: 100%;
          height: 100%;
          background-color: rgba(0, 0, 0, 0.5);
        }
		/* 审核状态 */
		.check_state{
			position: absolute;
			right: 0;
			top: 0;
			z-index:4;
		}
		.check_state_sign,.down_img_btn,.check_ok,.check_no{
			display: block;
			float: right;
			max-width: 20px;
			height: 20px;
		}
		.check_state_sign{
			min-width:20px;
			text-align: center;
			font-size: 0.62rem;
			line-height: 20px;
			color: #fff;
			background-color: #56b1ff;
		}

		.check_ok,.check_no{
			position: relative;
			width: 20px;
			height:20px;
			right: -1px;
		}
		.check_ok img,.check_no img{
			position: absolute;
			top:50%;
			left:50%;
		}
		.check_no{
			background-color: #FE4B1C;
		}
		.check_no img{
			width: 10px;
			height: 10px;
			margin: -5px 0 0 -5px;
		}
		.xuanfu{
				background: #FF481C;
				color:#fff;
				overflow: hidden;
				z-index: 9999;
				position: fixed;
				padding:5px;
				text-align:left;
				width: 220px;
				border-bottom-left-radius: 4px;
				border-bottom-right-radius: 4px;
				border-top-left-radius: 4px;
				border-top-right-radius: 4px;
				right:10px;
				top: 10%;
				opacity:0.5;
				font-size:14px;
			}
    </style>
    </head>
    <body>
	
	
<link rel="stylesheet" href="__PUBLIC__/static/css/renwu/taskdatail.css">	
<header>
	<a onclick="history.back()" class="left"><img src="__PUBLIC__/static/upload/renwu/icon_back.png" alt=""></a>
	<?php echo $res[0]['title'] ?>	 <a href="announcement" class="right"><img src="__PUBLIC__/static/upload/renwu/guize.png" alt=""></a>
</header>
<div class="user_infor">
	<div class="container">
		<div class="header">
			<span>
				<img src="<?php echo $res[0]['img'] ?>" onerror="this.src=&#39;/static/home/mobile/picture/user.png&#39;">
			</span>
			<img src="__PUBLIC__/static/upload/renwu/vip.png" alt="" class="icon">
		</div>
		<div class="state">
			<span>ID:<?php echo $res[0]['id'] ?></span>
			<font>24小时内审核</font>
		</div>
		<div class="detail">
			<h3><?php echo $res[0]['title'] ?></h3>
			<p class="price"><?php echo $res[0]['money'] ?>.00<font>元</font></p>
			<p class="title">已完成<?php echo $res[0]['count'] ?>个，剩余<?php echo $res[0]['remaining'] ?>个。</p>
			<p class="tips">请先报名再做任务，否则无赏金</p>
		</div>
	</div>
</div>
<!-- 报名提示 -->
<div class="bm_tips">
	<div class="container">
		<h3>报名提示</h3>
		<ul>
			<li>
				<span></span>未交保任务，请不要投资，否则亏损自负。
			</li>
			<li>
				<span></span>通过率低的任务请谨慎参与。
			</li>
			<li>
				<span></span>要求1小时内提交，不能按时完成请不要报名。
			</li>
		</ul>
	</div>
</div>





<div class="bm_steps">
	
<form id="post_form">

	<div class="container">
		
		
		
			</div>





</form></div>

<input type="hidden" name="id" value="581">


<br>
<br>


               
		<button class="fix_btn" id="replyUrl">抢单</button>
        

		


    <link href="__PUBLIC__/static/css/renwu/new_style.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/static/css/renwu/swiper.min.css" type="text/css" rel="stylesheet">
	<link href="__PUBLIC__/static/css/renwu/new_page.css" rel="stylesheet" type="text/css">

        <script type="text/javascript" src="__PUBLIC__/static/js/renwu/jquery.min.js"></script>
        <script type="text/javascript" src="__PUBLIC__/static/js/renwu/swiper.min.js"></script>
        
        <script type="text/javascript" src="__PUBLIC__/static/js/renwu/global.js"></script>
        <!-- 弹出层 -->
        <script src="__PUBLIC__/static/js/renwu/dialog.js"></script>
        <!-- 弹出层 -->
        <script type="text/javascript">


		

	var id = 581;
        $("#replyUrl").click(function(){
            $(document).dialog({
                type : 'confirm',
                titleText: '任务抢单',
                content: '请按备注及操作说明完成任务，完成后按要求在【我的任务】里上传验证图',
                onClickConfirmBtn: function(){
                    $loading = message('正在抢单','','loading');
                    $.post('/home/task/accept.html', { id: id }, function(res) {
                        message(res.message,res.redirect,res.type);
                        $loading.close();
                    });
                }
            });
        });


    //屏幕可用区域高度
    var scroWidth=$(window).width();
    var scroHeight=window.innerHeight;

    //上传
    function setImagePreviews(id) {

        var docObj = document.getElementById("checkImgData" + id);
        if (docObj.files && docObj.files[0]) {
            
            $("#checkImg" + id).attr("src",window.URL.createObjectURL(docObj.files[0]));
			
        }else {
            //IE下，使用滤镜
            docObj.select();
            var imgSrc = document.selection.createRange().text;
            var localImagId = document.getElementById("checkImg" + id);
			
            //必须设置初始大小
            localImagId.style.width = "300px";
            localImagId.style.height = "500px";
            //图片异常的捕捉，防止用户修改后缀来伪造图片
            try {
                localImagId.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)";
                localImagId.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgSrc;
            }
            catch (e) {
                alert("您上传的图片格式不正确，请重新选择!");
                return false;
            }
            document.selection.empty();
        }

		
		


        $("#checkImg" + id).addClass('uploadImg').css({width:"150px",height:"250px"});
        $("#checkFileWrap" + id + "  input[type=file]").css({width:"10rem",marginLeft:"-5rem"});
        $("#checkMsg" + id).addClass('content_hide');
        $("#checkUl li").css({width:scroWidth + "px"});

        var delWrap = document.getElementById("checkState" + id);
        if(delWrap == null || delWrap == '' || delWrap == undefined){
            //判断是否是一张多次更改 - 否
            //增加删除按钮
            var delHtml = '';
            delHtml += '<div class="check_state" id="checkState'+ id +'">';
            delHtml += '<div class="check_no" onclick="delCheckImg('+ id +');"><img src="/static/home/mobile/images/state_no.png" alt="不合格"/></div></div>';
            $("#checkFileWrap" + id).append(delHtml);
           
            var liLength = $("#checkUl li").length; 
            if(liLength < 5){
                $("#checkUl .clear").remove();
                //增减添加图片项
                var html = '';
                html += '<li class="checkFile" id="checkFile' + (id+1) + '">';
                html += '<div class="file_wrap" id="checkFileWrap' + (id+1) + '">';
                html += '<img src="/static/home/mobile/images/img.png" style="width:70px;height:70px;" id="checkImg' + (id+1) + '">';
                html += '<input type="file" name="checkFile[]" class="checkInput" id="checkImgData' + (id+1) + '" onchange="setImagePreviews(' + (id+1) + ');" accept="image/*">';
                html += '<div class="upload_msg checkMsg" id="checkMsg' + (id+1) + '">上传图片</div></div></li>';
                html += '<div class="clear"></div>';
                $("#checkUl").append(html);
                $(".bottom_a").css({display:"block"});
            }          
            var img_num=$("#checkUl li").length; //图片个数
            $("#checkUl").css( "width",scroWidth * img_num); //设置ul的长度
            $("#checkUl li").css("width",scroWidth + "px"); 
            $(".msg_cont").html("注：点击右侧箭头可继续上传。");//上传过相片的提示信息
            $(".msg_cont").addClass('msg_cont_center');

        }

        var subBtnStat = $(".check_btn_wrap").css("display");
        if(subBtnStat == 'none'){
            $(".check_btn_wrap").show();
        }
        return true;
    }

    function delCheckImg(id){
        //删除审核图样单张图片
        //图片上传后点取消，改变title  并且隐藏图片切换和提交按钮
        //$("title,.title").html('上传图片');
		$("#checkImg" + id).css("width","70px");
		$("#checkImg" + id).css("height","70px");
		$("#checkImg" + id).attr("src","/static/home/mobile/images/img.png");
		$("#checkMsg" + id).removeClass('content_hide');
		
        
    }     

    function returnCreateCheck(){
        //取消
        var checkLiNum = $("#checkUl").html('');
        $(".checkFile,#checkUl .clear").remove();
        //图片上传后点取消，改变title  并且隐藏图片切换和提交按钮
        $("title,.title").html('上传图片');
        var html = '';
        html += '<li class="checkFile" id="checkFile0">';
        html += '<div class="file_wrap checkFileWrap" id="checkFileWrap0">';
        html += '<img src="/static/home/mobile/images/img.png" id="checkImg0">';
        html += '<input type="file" name="checkFile[]" class="checkInput" id="checkImgData0" onchange="setImagePreviews(0);" accept="image/*">';
        html += '<div class="upload_msg checkMsg" id="checkMsg0">上传图片</div></div></li>';
        html += '<div class="clear"></div>';
        $("#checkUl").append(html);

        $("#checkUl").css({width:scroWidth + "px" , marginLeft:"0"});
        $(".bottom_a").css({display:"none"});//左右切换按钮
        $(".check_btn_wrap").hide();
        $(".msg_cont").html("注：如需上传多张验证图，传完第一张后，点击右侧箭头可继续上传下一张，最多可上传5张。");//没有上传过的提示信息
        $(".msg_cont").removeClass('msg_cont_center');
        
    }



    //点击放大图片
    function imgBig(id){
        var thisSrc = $(id).attr("src");
        $(".big_img").attr("src",thisSrc);
        $(".big_img_wrap,.big_img_content").show();
        var thisHeight = parseInt($(".big_img").css("height"));
        $(".big_img").css({ marginTop : -thisHeight/2 + "px"});
    }

    
	function notqiangdan(){
		message('请先抢单！','','error');
	}
    

    function save() {
        var checkImgLength = $("#checkImg2").length;

		
        if(checkImgLength==0){
             message('请上传验证图！','','error');
             return false;
        } 

		
       
            if($("#check_text_content").val().trim()==""){
                message('文字验证未按要求填写！','','error');
                $("#check_text_content").focus();
                return false;
            }
			
		

        message('正在发布','','loading');
        var formData = new FormData($( "#post_form" )[0]);
		
        var ua = navigator.userAgent.toLowerCase();
        if (ua.indexOf('safari') != -1 || ua.indexOf('iphone') != -1 || ua.indexOf('ipad') != -1 || ua.indexOf('ipod') != -1) {
            try {
                var iterator = formData.entries(), end = false;
                while(end == false) {
                    var item = iterator.next();
                    if (item.value != undefined) {
                        var pair = item.value;
                        console.log(pair);
                        if (pair[1] instanceof File) {
                            var files = formData.getAll(pair[0]);
                            formData.delete(pair[0]);
                            jQuery.each(files, function (key, fileNameObject) {
                                if (fileNameObject.name && fileNameObject.size != 0) {
                                    formData.append(pair[0], fileNameObject);
                                }
                            });
                        }
                    } else if (item.done == true) {
                        end = true;
                    }
                }
            } catch (e) {
                console.log(e.message);
            }
        }
        $.ajax({
            url: '/home/taskcheck/post',
            type: 'POST',
            data: formData,
            dataType: "json",
            async: false,
            cache: false,
            contentType: false,
            processData: false,
            success: function (res) {
                message(res.message,res.redirect,res.type);
            },
            error: function () {
                message('请求错误','','error');
            }
        });
    }
	</script>



	<script src="__PUBLIC__/static/js/renwu/clipboard.min.js"></script>
	<script>
 
        var clipboard = new ClipboardJS('.btnn');
        clipboard.on('success', function(e) {
            console.info('Action:', e.action);
            console.info('Text:', e.text);
            console.info('Trigger:', e.trigger);
			message('复制成功','','success')
            e.clearSelection();
        });
       clipboard.on('error', function(e) {
            console.error('Action:', e.action);
            console.error('Trigger:', e.trigger);
			message('复制失败','','error')
        });
		
    </script>


	




    
</body></html>